package com.ying.excel.domain.po;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.ying.excel.domain.converter.GenderConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author jie
 * @since 2024-10-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ExecelUser implements Serializable {
    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ExcelProperty(value = "姓名",order = 1,index = 1)
    private String name;

    @ExcelProperty(value="城市",order = 2,index = 2)
    //设置列宽
    @ColumnWidth(18)
    private String city;

    @ColumnWidth(18)
    @ExcelProperty(value = "手机号码",order = 3  ,index = 3)
    private String phone;

    @ColumnWidth(18)
    @DateTimeFormat("yyyy-MM-dd")
    @ExcelProperty(value = "出生日期" ,order = 4,index = 4)
    private LocalDate birthday;

    @ExcelProperty(value = "性别",converter = GenderConverter.class,order = 5,index = 5)
    private Integer sex;
}
